// 从数组中移除重复项
const removeDuplicates = (arr) => [...new Set(arr)]
console.log(removeDuplicates([1, 1, 2, 3, 8, 5, 2, 9, 3]))

// 判断数组是否为空
const isNotEmpty = arr => Array.isArray(arr) && arr.length > 0
console.log(isNotEmpty([1, 2, 3]))

// 合并两个数组
const mergeArr1 = (a, b) => a.concat(b)
const mergeArr2 = (a, b) => [...a, ...b]
console.log(mergeArr1([1, 4, 7], [2, 5, 8]))
console.log(mergeArr2([1, 4, 7], [2, 5, 8]))